function TopFn(){
	this.shangyi = document.getElementsByClassName('shangyi');
}
TopFn.prototype.init = function(){
	for (var i = 0; i < this.shangyi.length; i++) {
		this.shangyi[i].index = i;
		this.shangyi[i].onmouseover = function(){
			this.style.marginTop = "1px";
			this.style.transition = "all 1s";
		}
		this.shangyi[i].onmouseout = function(){
			this.style.marginTop = "";
			this.style.transition = "all 1s";
		}
	}
}
var dong = new TopFn();
	dong.init();